package com.example.recyclerview.viewHolder


import android.util.Log
import android.view.View
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView

import com.example.recyclerview.UsingData
import com.example.remindme.R


class ViewHolderBlock(val root:View): RecyclerView.ViewHolder(root) {
    val iconView:ImageView=root.findViewById(R.id.appicon)
    val name:TextView=root.findViewById(R.id.appname)
    val time:TextView=root.findViewById(R.id.apptime)
    fun bind(data: UsingData)
    {

        // 通过vieholder对数据进行了加载
       // iconView.setImageDrawable(R.drawable.ic_launcher_round as Drawable)
        iconView.adjustViewBounds=true
        name.text=data.appname
        time.text=data.usedTime
       // Log.d("holder",data.appname+":"+data.usedTime)
    }
}

